import type { DragItemType } from '@/types/template';
export const modules: DragItemType[] = [
  {
    id: 1,
    type: 'Custom',
    title: '自定义',
    enTitle: 'custom',
    x: 0,
    y: 0,
    w: 10,
    h: 4,
    field: 'custom',
    value: 'XXX',
    valueDesc: '该值的描述',
    regExp: '',
    options: '',
    maxLength: 0,
    required: true,
  },
  {
    id: 2,
    type: 'ENName',
    title: '英文姓名',
    enTitle: 'English Name',
    x: 0,
    y: 0,
    w: 24,
    h: 4,
    field: 'EnName',
    value: 'XXX YYY',
    valueDesc: '',
    regExp: '',
    maxLength: 0,
    required: true,
  },
  {
    id: 3,
    type: 'CNName',
    title: '中文姓名',
    enTitle: 'Name in Chinese',
    x: 0,
    y: 0,
    w: 10,
    h: 4,
    field: 'CNName',
    value: 'XXX',
    valueDesc: '',
    regExp: '',
    maxLength: 0,
    required: true,
  },
  {
    id: 4,
    type: 'CNNameCode',
    title: '中文姓名电码',
    enTitle: 'Chinese Name in Code',
    x: 0,
    y: 0,
    w: 14,
    h: 4,
    field: 'nameCode',
    value: 'XXX',
    valueDesc: '',
    regExp: '',
    maxLength: 0,
    required: true,
  },
  {
    id: 5,
    type: 'Birthday',
    title: '出生日期',
    enTitle: 'Date of Birth',
    x: 0,
    y: 0,
    w: 10,
    h: 4,
    field: 'birthday',
    value: 'XXX',
    valueDesc: '日DD/月MM/年YYYY',
    regExp: '/^(0[1-9]|1[0-2])/(0[1-9]|[12]\d|3[01])/\d{4}$/',
    maxLength: 0,
    required: true,
  },
  {
    id: 6,
    type: 'PlaceOfBirth',
    title: '出生地点',
    enTitle: 'Place of Birth',
    x: 0,
    y: 0,
    w: 24,
    h: 4,
    field: 'place',
    value: 'XXX',
    valueDesc: '',
    regExp: '',
    maxLength: 0,
    required: true,
  },
  {
    id: 7,
    type: 'HKID',
    title: '香港身份证号码',
    enTitle: 'Hong Kong Identity Card Number',
    x: 0,
    y: 0,
    w: 24,
    h: 4,
    field: 'id',
    value: 'XXX',
    valueDesc: '',
    regExp: '',
    maxLength: 0,
    required: true,
  },
  {
    id: 8,
    type: 'Sex',
    title: '性别',
    enTitle: 'Sex',
    x: 0,
    y: 0,
    w: 10,
    h: 4,
    field: 'sex',
    value: '1',
    valueDesc: '',
    regExp: '',
    options: `[{
      "label":"男",
      "enLabel":"Male",
      "value":"1"
    },{
      "label":"女",
      "enLabel":"Female",
      "value":"2"
    }]`,
    maxLength: 0,
    required: true,
  },
  {
    id: 9,
    type: 'Passport',
    title: '护照/旅行证件号码',
    enTitle: 'Passport/Travel Document Number',
    x: 0,
    y: 0,
    w: 24,
    h: 4,
    field: 'passport',
    value: 'XXX',
    valueDesc: '',
    regExp: '',
    maxLength: 0,
    required: true,
  },
  {
    id: 10,
    type: 'IssuingAuthority',
    title: '签发机关',
    enTitle: 'Issuing Authority',
    x: 0,
    y: 0,
    w: 10,
    h: 4,
    field: 'issuingAuthority',
    value: 'XXX',
    valueDesc: '',
    regExp: '',
    maxLength: 0,
    required: true,
  },
  {
    id: 11,
    type: 'Address',
    title: '住址',
    enTitle: 'Residential Address',
    x: 0,
    y: 0,
    w: 24,
    h: 12,
    field: 'address',
    value: 'XXX,XXX,XXX,XXX',
    valueDesc: '',
    regExp: '',
    maxLength: 0,
    required: true,
  },
  {
    id: 12,
    type: 'Mobile',
    title: '流动电话',
    enTitle: 'Mobile Phone',
    x: 0,
    y: 0,
    w: 10,
    h: 4,
    field: 'mobile',
    value: 'XXX',
    valueDesc: '',
    regExp: '',
    maxLength: 0,
    required: true,
  },
  {
    id: 13,
    type: 'Telephone',
    title: '住所电话',
    enTitle: 'Residential Telephone Number',
    x: 0,
    y: 0,
    w: 16,
    h: 4,
    field: 'telephone',
    value: 'XXX',
    valueDesc: '',
    regExp: '/^1[3-9]\d{9}$/',
    maxLength: 0,
    required: true,
  },
  {
    id: 14,
    type: 'Email',
    title: '电邮地址',
    enTitle: 'E-mail Address',
    x: 0,
    y: 0,
    w: 10,
    h: 4,
    field: 'email',
    value: 'XXX',
    valueDesc: '',
    regExp: '/^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$/',
    maxLength: 0,
    required: true,
  },
  {
    id: 15,
    type: 'Photo',
    title: '照片',
    enTitle: '',
    x: 0,
    y: 0,
    w: 8,
    h: 16,
    field: 'photo',
    value: '',
    valueDesc: '',
    regExp: '',
    required: false,
  },
  {
    id: 16,
    type: 'Empty',
    title: '占位控件',
    enTitle: 'empty',
    x: 0,
    y: 0,
    w: 6,
    h: 4,
    field: 'empty',
    value: '',
    valueDesc: '',
    regExp: '',
    required: false,
  },
];
export const modulesTypeList = modules.map((item) => item.type);
export const modulesData = {
  custom: '微信',
  EnName: 'hua liu',
  CNName: '刘华',
  nameCode: '236523456789',
  birthday: '1990-01-01',
  place: '中国',
  id: '123456789012345678',
  sex: '1',
  passport: '256523456789',
  issuingAuthority: '香港',
  address: '辽宁省,沈阳市,和平区,中街',
  mobile: '24760432',
  telephone: '13800000000',
  email: 'dehua.liu@example.com',
  photo:
    'https://img1.baidu.com/it/u=3002723137,306506776&fm=253&app=138&f=JPEG?w=800&h=1200',
};
